package com.ruoyi.assessLog.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.assessLog.mapper.AssessLogMapper;
import com.ruoyi.assessLog.domain.AssessLog;
import com.ruoyi.assessLog.service.IAssessLogService;

/**
 * 出入日志Service业务层处理
 * 
 * @author 张柏焰
 * @date 2024-07-09
 */
@Service
public class AssessLogServiceImpl implements IAssessLogService 
{
    @Autowired
    private AssessLogMapper assessLogMapper;

    /**
     * 查询出入日志
     * 
     * @param id 出入日志主键
     * @return 出入日志
     */
    @Override
    public AssessLog selectAssessLogById(Long id)
    {
        return assessLogMapper.selectAssessLogById(id);
    }

    /**
     * 查询出入日志列表
     * 
     * @param assessLog 出入日志
     * @return 出入日志
     */
    @Override
    public List<AssessLog> selectAssessLogList(AssessLog assessLog)
    {
        return assessLogMapper.selectAssessLogList(assessLog);
    }

    /**
     * 新增出入日志
     * 
     * @param assessLog 出入日志
     * @return 结果
     */
    @Override
    public int insertAssessLog(AssessLog assessLog)
    {
        assessLog.setCreateTime(DateUtils.getNowDate());
        return assessLogMapper.insertAssessLog(assessLog);
    }

    /**
     * 修改出入日志
     * 
     * @param assessLog 出入日志
     * @return 结果
     */
    @Override
    public int updateAssessLog(AssessLog assessLog)
    {
        assessLog.setUpdateTime(DateUtils.getNowDate());
        return assessLogMapper.updateAssessLog(assessLog);
    }

    /**
     * 批量删除出入日志
     * 
     * @param ids 需要删除的出入日志主键
     * @return 结果
     */
    @Override
    public int deleteAssessLogByIds(Long[] ids)
    {
        return assessLogMapper.deleteAssessLogByIds(ids);
    }

    /**
     * 删除出入日志信息
     * 
     * @param id 出入日志主键
     * @return 结果
     */
    @Override
    public int deleteAssessLogById(Long id)
    {
        return assessLogMapper.deleteAssessLogById(id);
    }
}
